﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;

//棋盘类
class ChessBoard
{
    //画棋盘方法
    public static void DrawCB(Graphics g)
    {
        //棋格宽度
        int GapWidth = MainSize.CBoardGap;
        //棋格数量
        int GapNum = MainSize.CBoardWidth / GapWidth - 1;


        g.Clear(Color.Bisque);
        Pen pen = new Pen(Color.FromArgb(192, 166, 107));
        for (int i = 0; i < GapNum + 1; i++)
        {
            g.DrawLine(pen, new Point(20, i * GapWidth + 20), new Point(GapWidth * GapNum + 20, i * GapWidth + 20));
            g.DrawLine(pen, new Point(i * GapWidth + 20, 20), new Point(i * GapWidth + 20, GapWidth * GapNum + 20));

        }
    }
}

